Skip to content

Instantly share code, notes, and snippets.

@Kartones
Kartones / postgres-cheatsheet.md
Last active July 26, 2026 20:24
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
#EXTM3U
#EXTINF:0 group-title="General",13 C
#EXTGRP:General
#EXTVLCOPT:network-caching=1000
http://181.78.79.131:8000/play/a0pm
#EXTINF:0 group-title="Entretenimiento",A&E HD
#EXTGRP:Entretenimiento
#EXTVLCOPT:network-caching=1000
http://181.78.79.131:8000/play/a0mt
#EXTINF:0 group-title="Entretenimiento",AE Mundo
name explain-diff-html
description Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output.

Explain Diff

Please make me a rich, interactive explanation of the specified code change.

It should have these sections:

@Lxys-ai
Lxys-ai / engine.js
Created September 30, 2022 03:53
Lex State Machine Task Engine a
/* eslint-disable */
const fs = require("fs");
const colors = require("colors");
const child_process = require("child_process");
const path = require("path");
const events = require("events");
const eventEmitter = new events.EventEmitter();
const monitorEvent = new events.EventEmitter();
const crypto = require("crypto");
const utf8 = require("utf8");
@minkcv
minkcv / gist:ccb04c62c287f6bf7c01fcb3d2014474
Last active July 26, 2026 20:18
Buttons on devkitPro switch port of SDL2
// This is what devkitPro has done with the SDL keybinds for the switch.
// These are not any of the built in SDL_CONTROLLER_* values or SDL_JOYSTICK_* values from the SDL 2.0 documentation.
// Which makes development very confusing if you haven't read the thread on gbatemp about these.
// The analog sticks are mapped here as buttons. Meaning the analog sticks only report 4 directions each.
// The Analog stick "click in" is reported here so that is nice.
// Snippet from devkitPro/SDL
// src/joystick/switch/SDL_sysjoystick.c
// with added comments indicating numbers for keys
static const HidControllerKeys pad_mapping[] = {
@patriknyblad
patriknyblad / xcrun_simctl_cheatsheet.md
Last active July 26, 2026 20:17
iOS Simulator Terminal Commands `$ xcrun simctl`

Managing iOS Simulators

List all simulators created

$ xcrun simctl list --json

Delete old and unavailable simulators

$ xcrun simctl delete unavailable
@miketartar
miketartar / ColdTurkeyBlockerActivator.py
Created September 26, 2020 04:21
Cold Turkey Blocker Activator
import json
import sqlite3
import os
DB_PATH = "C:/ProgramData/Cold Turkey/data-app.db"
def activate():
@adammyhre
adammyhre / FogObstacle.cs
Created July 26, 2026 05:12
Interactive Ground Fog for Unity URP
using UnityEngine;
public class FogObstacle : MonoBehaviour {
[SerializeField] float radius = 1.5f;
public float Radius => radius;
}
@stevesoltys
stevesoltys / nixos_apple_silicon_steam.md
Last active July 26, 2026 20:16
Steam on Asahi NixOS

Running Steam on NixOS Apple Silicon

This guide details how to run Steam on nixos-apple-silicon using Distrobox.

Tested on:

  1. MacBook Pro M2 Max
  2. NixOS channel 25.11 (unstable channel, at the time of writing)
  3. OpenGL core profile version string: 4.6 (Core Profile) Mesa 25.2.4
  4. Wayland / Sway / SDDM
  5. Kernel: 6.16.8-asahi
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active July 26, 2026 20:15
Complete Recent Discord Quest

Caution

As of April 7th 2026, Discord has expressed their intent to crack down on automating quest completion.

Some users have received the following system message:

image

There isn't much I can do to make the script undetected, so use it at your own risk, as you most likely WILL get flagged by doing so.

Complete Recent Discord Quest